Skip to content

Add auto make merge#660

Merged
JulienPalard merged 6 commits into
python:3.7from
Seluj78:add-auto-make-merge
Apr 8, 2019
Merged

Add auto make merge#660
JulienPalard merged 6 commits into
python:3.7from
Seluj78:add-auto-make-merge

Conversation

@Seluj78

@Seluj78 Seluj78 commented Apr 5, 2019

Copy link
Copy Markdown
Collaborator

No description provided.

@JulienPalard

Copy link
Copy Markdown
Member

It would be great if the cpython sha1 in .travis.yml gets updated too

@Seluj78

Seluj78 commented Apr 5, 2019

Copy link
Copy Markdown
Collaborator Author
mais ça nécessite d'avoir pré-cloné cpython
ou alors tu fais la branche après
fais le make merge en premier, sur la 3.7, sans commit
comme ça ça clone cpython
puis git checkout -b 
il faut faire le sed dans le .travis.yml aussi
pour changer le commit upstream```

@JulienPalard

Copy link
Copy Markdown
Member

Not for editing .travis, it can be done at the end.

@Seluj78

Seluj78 commented Apr 5, 2019

Copy link
Copy Markdown
Collaborator Author

TODO:

  • git -C ../cpython rev-parse --short HEAD
  • sed .travis.yml

@JulienPalard

Copy link
Copy Markdown
Member

And while you're at it, but it's more complicated, you can name the branch with the sha1 from cpython instead of the sha1 from python-docs-fr (so you'll have to create the branch after merging (you're not garanteed to have cpython before merging))

@Seluj78

Seluj78 commented Apr 5, 2019

Copy link
Copy Markdown
Collaborator Author

Here's my idea of the flow of this script on a server. It will be hosted on a small thingy somewhere, executed by a cron job.

Cron job:

  • rm /tmp/python-docs-fr && git clone https://github.com/USERTHATWILLDOTHEPR/python-docs-fr /tmp/python-docs-fr && cd /tmp/python-docs-fr && bash make-merge.sh

The script will:

  • Clone latest cpython in /tmp/cpython
  • get the latest commit from cpython git -C ../cpython rev-parse --short HEAD
  • Create a new branch named upstream-merge-$(CPYTHON_SHA) and checkout the branch
  • Sed .travis.yml old sha to new $(CPYTHON_SHA)
  • run make merge
  • install pyhub-pr
  • commit and push changes to fork
  • create PR

@JulienPalard

Copy link
Copy Markdown
Member

So apart of make merge, nothing versionned here? Works for me.

@Seluj78

Seluj78 commented Apr 5, 2019

Copy link
Copy Markdown
Collaborator Author

Well .travis.yml and the files from make merge will be modified and committed

@JulienPalard

Copy link
Copy Markdown
Member

yep I meant the cron script

@Seluj78

Seluj78 commented Apr 5, 2019

Copy link
Copy Markdown
Collaborator Author

Well the cron script will be on a server somewhere, and won't change, this is why the process is on this file on the repository that will be cloned

Comment thread make-merge.sh Outdated
@JulienPalard
JulienPalard merged commit 3cd2a5e into python:3.7 Apr 8, 2019
@JulienPalard

Copy link
Copy Markdown
Member

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants